#ifndef DNKF_H
#define DNKF_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#define D_immutable const

typedef char  D_char;
typedef short D_wchar;
typedef long  D_dchar;
typedef unsigned long  D_size_t;

typedef struct
{
	D_size_t length;
	D_char *ptr;
}
D_string;

typedef struct
{
	D_size_t length;
	D_wchar *ptr;
}
D_wstring;

typedef struct
{
	D_size_t length;
	D_dchar *ptr;
}
D_dstring;


D_immutable D_string dnkf_version(void);

D_immutable D_string dnkf_convert(D_immutable D_char *optStr, 
                                  D_size_t optLen, 
                                  const void *inStr, 
                                  D_size_t inLen);

D_immutable D_string dnkf_guess(const void *inStr, 
                                D_size_t inLen);

void dnkf_module_ctor(void);

void dnkf_module_dtor(void);


static void reinit_dnkf(void);

#ifdef __cplusplus
}       // Balance extern "C" above
#endif /*__cplusplus*/

#endif
